To define single-use custom iParts
To use a custom iPart on just one page, you can simply add it to the relevant content record. Select Content Designer > Manage content, and then Edit any content record (because they all share the same list of available iParts). In the definition section, click the add content link. In the Gallery that appears, select the Content folder. Select an existing simple iPart and click the Edit icon to edit its properties, or click the Delete icon to delete the iPart.
When you save the definition, an entry for the new simple iPart appears in the Content gallery for use by all people who perform web content authoring.
Note: When specifying paths to controls, be sure to use a root-relative URL with forward slashes (/) for the segment delimiters. For example, ~/CustomControls/myControl.ascx.
Note: You can also use this same procedure to add custom user controls to a content record in an ad hoc manner: Specify the relative path to the user control in the Or, enter a path to a web user control field.
To define complex iParts
The Or, enter a path to a web user control field allows implementers to add complex enhancements to iMIS or your iMIS sites.
■ To add a single-use control: The Or, enter a path to a web user control field lets you add a custom iPart in an ad hoc manner. You must place the iPart control (the .ascx file) somewhere in the virtual directory structure beneath the iMIS application in IIS and then specify the relative path to the control in this field. For example, entering ~/TestWebUserControl.ascx would add the TestWebUserControl found in C:\Program Files\ASI\iMIS\net\ on the iMIS application server.
■ To add a reusable (Gallery) control: The Or, enter a path to a web user control field also lets you add a custom iPart into the Gallery so that it can be easily found and reused. You must place the iPart control (the .ascx file) into the virtual directory structure beneath the iMIS application in IIS into the \iParts folder and then the Gallery subfolder (such as \Commerce) where you want it to appear, like this: ~/iParts/Commerce/[YourControl]/[YourControl].ascx. Then you create a new content type that specifies how the control appears in the Gallery.
You define a complex iPart by defining its supporting content type. When you save the definition of the content type, the new iPart appears in the iPart Gallery for use by all people who perform web content authoring. You can also transport and deploy your iPart using the Package Installer.
In the Maintenance area of Content Management, select Content Types. From the toolbar, choose New > Content Type to create a new content type, choose Edit to change an existing content type, or choose Organize > Delete to delete a content type.
Note: When specifying paths to controls, be sure to use root-relative URLs with forward slashes (/) for the segment delimiters. Example: ~/CustomControls/myControl.ascx
Troubleshooting
■ You must be a member of at least one Master Admin content authority group (CAG).
■ You must have administrative access to the entire file system on your iMIS application server and on all the external web servers that you use for hosting iMIS sites.
■ You must be familiar with ASP.NET development concepts and techniques, especially those related to creating user controls and data contracts, and creating and compiling classes.
■ Ensure that the custom user controls that are used for both your simple and complex iParts are placed in the same relative folder beneath the root (~) of the physical path for all IIS applications and IIS web sites that host your iMIS sites. Make note of the relative URL to this folder (such as ~/CustomControls), because you must specify this value when defining iParts.
■ If you are defining complex iParts, you must also ensure that the class libraries containing the custom classes that are used for the corresponding content type are placed in the bin folder beneath the root of the physical path for all IIS applications and IIS web sites that host your iMIS sites. Make note of the relative URL to this folder (such as ~/bin), because you must specify this value when defining complex iParts.
Copying a new class library to the bin folder will cause each server's worker process to be recycled, so you should generally perform this task during scheduled maintenance or other downtime.
Note: Membership in the SysAdmin security role effectively grants the full set of Document System permissions and the full set of CAG permissions (you are effectively a member of a MasterAdmin CAG too). However, to participate in web content authoring workflow, even members of the SysAdmin role must be an explicitly-listed member of at least one CAG.
Simple versus complex iParts
Simple iParts have no custom configuration and are linked to only a single ASP.NET user control. WCM displays a basic editor when users select a simple iPart from the Content gallery. You cannot customize how simple iParts are rendered or published, but you can expose properties of the user control in this basic editor by using the Personalizable and WebBrowsable attributes (and optionally, the WebDisplayName and WebDescription attributes too) in the code for the user control. For example:
[Personalizable(PersonalizationScope.User)]
[WebBrowsable()]
[WebDisplayName("Document System Path")]
[WebDescription("The full Document System path (e.g., starting with $/) to
the query or folder of queries to use to find the desired information.
Used to find information by Query.")]
public string DocumentPath
{
get
{
...
}
set
{
...
}
}
Complex iParts can be controlled in how they are configured, rendered, and published. All of the default iParts in the WCM environment are complex iParts.